package edu.berkeley.cs160.innovationers.shoppersidekick;

import java.util.ArrayList;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

public class MemberAdapter extends BaseAdapter {
	
	protected Context context;
	protected ArrayList<Member> MemberList;
	
	public MemberAdapter(Context context, ArrayList<Member> mem) { 
        this.context = context;
        this.MemberList = mem;
    }

	@Override
	public int getCount() {
		// TODO Auto-generated method stub
		return MemberList.size();
	}

	@Override
	public Object getItem(int position) {
		// TODO Auto-generated method stub
		if(position < MemberList.size())
			return MemberList.get(position);
		else
			return null;
	}

	@Override
	public long getItemId(int position) {
		// TODO Auto-generated method stub
		return position;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		// TODO Auto-generated method stub
		return convertView;
	}

}
